import { getYear, getMonth, getDay } from "./time";
/**
 * @desc 随机数生成
 * @param {minNum} 期望最小值
 * @param {maxNum} 期望最大值
 * @param {custom} 自定义规则 规则 +出库+年月日+随机数
 */
export const randomNum = (minNum, maxNum, custom) => {
  let randomNum = parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
  if (custom != undefined) {
    return custom + getYear() + getMonth() + getDay() + randomNum;
  } else {
    return randomNum;
  }
};
